package cj.web.sc.controllers;

import net.paoding.rose.web.annotation.Param;
import net.paoding.rose.web.annotation.Path;
import net.paoding.rose.web.annotation.rest.Get;
import net.paoding.rose.web.var.Model;

import org.apache.log4j.Logger;
import org.springframework.beans.factory.annotation.Autowired;

import cj.web.sc.dao.SCGoodsBannerDAO;
import cj.web.sc.domain.SCGoodsBanner;

@Path("/sCGoodsBanner")
public class SCGoodsBannerController{

	private static Logger logger = Logger.getLogger(SCGoodsBannerController.class.getName());
	
	@Autowired
	private SCGoodsBannerDAO sCGoodsBannerDao;

	@Get("query")
	public String query(Model model,SCGoodsBanner sCGoodsBanner)
	{
		sCGoodsBannerDao.query(sCGoodsBanner);
		return null;
	}
	
	@Get("queryById")
	public String queryById(Model model,@Param("id") String id)
	{
		sCGoodsBannerDao.queryById(id);
		return null;
	}
	
	@Get("create")
	public String create(Model model,SCGoodsBanner sCGoodsBanner)
	{
		sCGoodsBannerDao.create(sCGoodsBanner);
		return null;
	}
	
	@Get("update")
	public String update(Model model,SCGoodsBanner sCGoodsBanner)
	{
		sCGoodsBannerDao.update(sCGoodsBanner);
		return null;
	}
	
	@Get("deleteById")
	public String deleteById(Model model,@Param("id") String id)
	{
		sCGoodsBannerDao.deleteById(id);
		return null;
	}
}
